﻿@using Db8.Data
@using Db8.ViewModels
@model ClaimViewModel
<div class="claim-box-pending-delete">

    @if (Model.Claim.CounterClaims.Count > 0 || Model.Claim.SupportingClaims.Count > 0)
    {
        <h4 class="field-validation-error">Unable to delete this arugment because it has responses and/or supporting arguments attached.</h4>
        <div class="display-field statement">
            @Html.DisplayFor(model => model.Claim.Statement)
        </div>
    }
    else
    {
        using (Html.BeginForm())
        {
            <h2 class="field-validation-error">Are you sure you want to delete this?</h2>
            @Html.HiddenFor(model => model.Claim.ClaimId, new { name = "id" })
            <div class="display-field statement">
                @Html.DisplayFor(model => model.Claim.Statement)
            </div>
            <div>
            @foreach (string kw in Model.Claim.ClaimKeywords.Select(ck => ck.Keyword.Value))
            {
                <span class="keyword">@kw</span>
            }
            </div>
        }
        <br />
        <span class="edit-button" title="Confirm Delete" post-action="@Url.Action("Delete", "Claim", new { id = Model.Claim.ClaimId })" load-deletes-this="delete">
            <img src="@Url.Content("~/images/close.png")" />
        </span>
    }
    <span class="edit-button" title="Back" load-action="@Url.Action("Edit", "Claim", new { id = Model.Claim.ClaimId })">
        <img src="@Url.Content("~/images/left.png")" />
    </span>
</div>
<br />